\(\int \frac {x (a+b \arctan (c x))}{(d+e x^2)^2} \, dx\) [1159]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F(-2)]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 91 \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\frac {b c^2 \arctan (c x)}{2 \left (c^2 d-e\right ) e}-\frac {a+b \arctan (c x)}{2 e \left (d+e x^2\right )}-\frac {b c \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} \left (c^2 d-e\right ) \sqrt {e}} \]

[Out]

1/2*b*c^2*arctan(c*x)/(c^2*d-e)/e+1/2*(-a-b*arctan(c*x))/e/(e*x^2+d)-1/2*b*c*arctan(x*e^(1/2)/d^(1/2))/(c^2*d-
e)/d^(1/2)/e^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {5094, 400, 209, 211} \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=-\frac {a+b \arctan (c x)}{2 e \left (d+e x^2\right )}+\frac {b c^2 \arctan (c x)}{2 e \left (c^2 d-e\right )}-\frac {b c \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} \sqrt {e} \left (c^2 d-e\right )} \]

[In]

Int[(x*(a + b*ArcTan[c*x]))/(d + e*x^2)^2,x]

[Out]

(b*c^2*ArcTan[c*x])/(2*(c^2*d - e)*e) - (a + b*ArcTan[c*x])/(2*e*(d + e*x^2)) - (b*c*ArcTan[(Sqrt[e]*x)/Sqrt[d
]])/(2*Sqrt[d]*(c^2*d - e)*Sqrt[e])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 400

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 5094

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(x_)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[(d + e*x^2)^(q + 1
)*((a + b*ArcTan[c*x])/(2*e*(q + 1))), x] - Dist[b*(c/(2*e*(q + 1))), Int[(d + e*x^2)^(q + 1)/(1 + c^2*x^2), x
], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {a+b \arctan (c x)}{2 e \left (d+e x^2\right )}+\frac {(b c) \int \frac {1}{\left (1+c^2 x^2\right ) \left (d+e x^2\right )} \, dx}{2 e} \\ & = -\frac {a+b \arctan (c x)}{2 e \left (d+e x^2\right )}-\frac {(b c) \int \frac {1}{d+e x^2} \, dx}{2 \left (c^2 d-e\right )}+\frac {\left (b c^3\right ) \int \frac {1}{1+c^2 x^2} \, dx}{2 \left (c^2 d-e\right ) e} \\ & = \frac {b c^2 \arctan (c x)}{2 \left (c^2 d-e\right ) e}-\frac {a+b \arctan (c x)}{2 e \left (d+e x^2\right )}-\frac {b c \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} \left (c^2 d-e\right ) \sqrt {e}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.08 \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\frac {a \sqrt {d} \left (c^2 d-e\right )-b \sqrt {d} e \left (1+c^2 x^2\right ) \arctan (c x)+b c \sqrt {e} \left (d+e x^2\right ) \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} e \left (-c^2 d+e\right ) \left (d+e x^2\right )} \]

[In]

Integrate[(x*(a + b*ArcTan[c*x]))/(d + e*x^2)^2,x]

[Out]

(a*Sqrt[d]*(c^2*d - e) - b*Sqrt[d]*e*(1 + c^2*x^2)*ArcTan[c*x] + b*c*Sqrt[e]*(d + e*x^2)*ArcTan[(Sqrt[e]*x)/Sq
rt[d]])/(2*Sqrt[d]*e*(-(c^2*d) + e)*(d + e*x^2))

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.09

method result size
parts \(-\frac {a}{2 e \left (e \,x^{2}+d \right )}-\frac {b \,c^{2} \arctan \left (c x \right )}{2 e \left (e \,c^{2} x^{2}+c^{2} d \right )}+\frac {b \,c^{2} \arctan \left (c x \right )}{2 \left (c^{2} d -e \right ) e}-\frac {b c \arctan \left (\frac {e x}{\sqrt {e d}}\right )}{2 \left (c^{2} d -e \right ) \sqrt {e d}}\) \(99\)
derivativedivides \(\frac {-\frac {a \,c^{4}}{2 e \left (e \,c^{2} x^{2}+c^{2} d \right )}+b \,c^{4} \left (-\frac {\arctan \left (c x \right )}{2 e \left (e \,c^{2} x^{2}+c^{2} d \right )}+\frac {-\frac {e \arctan \left (\frac {e x}{\sqrt {e d}}\right )}{\left (c^{2} d -e \right ) c \sqrt {e d}}+\frac {\arctan \left (c x \right )}{c^{2} d -e}}{2 e}\right )}{c^{2}}\) \(115\)
default \(\frac {-\frac {a \,c^{4}}{2 e \left (e \,c^{2} x^{2}+c^{2} d \right )}+b \,c^{4} \left (-\frac {\arctan \left (c x \right )}{2 e \left (e \,c^{2} x^{2}+c^{2} d \right )}+\frac {-\frac {e \arctan \left (\frac {e x}{\sqrt {e d}}\right )}{\left (c^{2} d -e \right ) c \sqrt {e d}}+\frac {\arctan \left (c x \right )}{c^{2} d -e}}{2 e}\right )}{c^{2}}\) \(115\)
risch \(\frac {i b \ln \left (i c x +1\right )}{4 e \left (e \,x^{2}+d \right )}-\frac {i c^{2} b \ln \left (\left (-i c x +1\right )^{2} e -c^{2} d -2 \left (-i c x +1\right ) e +e \right )}{8 \left (c^{2} d -e \right ) e}-\frac {i c b \,\operatorname {arctanh}\left (\frac {2 \left (-i c x +1\right ) e -2 e}{2 c \sqrt {e d}}\right )}{4 \left (c^{2} d -e \right ) \sqrt {e d}}-\frac {i c^{4} b \ln \left (-i c x +1\right ) x^{2}}{4 \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}-\frac {i c^{2} b \ln \left (-i c x +1\right )}{4 \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}+\frac {c^{2} a}{2 e \left (-e \,c^{2} x^{2}-c^{2} d \right )}-\frac {i b \,c^{2} \ln \left (c^{2} x^{2}+1\right )}{8 e \left (c^{2} d -e \right )}+\frac {b \,c^{2} \arctan \left (c x \right )}{4 \left (c^{2} d -e \right ) e}+\frac {i b \,c^{2} \ln \left (e \,x^{2}+d \right )}{8 e \left (c^{2} d -e \right )}-\frac {b c \arctan \left (\frac {e x}{\sqrt {e d}}\right )}{4 \left (c^{2} d -e \right ) \sqrt {e d}}\) \(354\)

[In]

int(x*(a+b*arctan(c*x))/(e*x^2+d)^2,x,method=_RETURNVERBOSE)

[Out]

-1/2*a/e/(e*x^2+d)-1/2*b*c^2*arctan(c*x)/e/(c^2*e*x^2+c^2*d)+1/2*b*c^2*arctan(c*x)/(c^2*d-e)/e-1/2*b*c/(c^2*d-
e)/(e*d)^(1/2)*arctan(e*x/(e*d)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 234, normalized size of antiderivative = 2.57 \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\left [-\frac {2 \, a c^{2} d^{2} - 2 \, a d e - {\left (b c e x^{2} + b c d\right )} \sqrt {-d e} \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right ) - 2 \, {\left (b c^{2} d e x^{2} + b d e\right )} \arctan \left (c x\right )}{4 \, {\left (c^{2} d^{3} e - d^{2} e^{2} + {\left (c^{2} d^{2} e^{2} - d e^{3}\right )} x^{2}\right )}}, -\frac {a c^{2} d^{2} - a d e + {\left (b c e x^{2} + b c d\right )} \sqrt {d e} \arctan \left (\frac {\sqrt {d e} x}{d}\right ) - {\left (b c^{2} d e x^{2} + b d e\right )} \arctan \left (c x\right )}{2 \, {\left (c^{2} d^{3} e - d^{2} e^{2} + {\left (c^{2} d^{2} e^{2} - d e^{3}\right )} x^{2}\right )}}\right ] \]

[In]

integrate(x*(a+b*arctan(c*x))/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*a*c^2*d^2 - 2*a*d*e - (b*c*e*x^2 + b*c*d)*sqrt(-d*e)*log((e*x^2 - 2*sqrt(-d*e)*x - d)/(e*x^2 + d)) -
2*(b*c^2*d*e*x^2 + b*d*e)*arctan(c*x))/(c^2*d^3*e - d^2*e^2 + (c^2*d^2*e^2 - d*e^3)*x^2), -1/2*(a*c^2*d^2 - a*
d*e + (b*c*e*x^2 + b*c*d)*sqrt(d*e)*arctan(sqrt(d*e)*x/d) - (b*c^2*d*e*x^2 + b*d*e)*arctan(c*x))/(c^2*d^3*e -
d^2*e^2 + (c^2*d^2*e^2 - d*e^3)*x^2)]

Sympy [F(-1)]

Timed out. \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\text {Timed out} \]

[In]

integrate(x*(a+b*atan(c*x))/(e*x**2+d)**2,x)

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(x*(a+b*arctan(c*x))/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [F]

\[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )} x}{{\left (e x^{2} + d\right )}^{2}} \,d x } \]

[In]

integrate(x*(a+b*arctan(c*x))/(e*x^2+d)^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.96 (sec) , antiderivative size = 696, normalized size of antiderivative = 7.65 \[ \int \frac {x (a+b \arctan (c x))}{\left (d+e x^2\right )^2} \, dx=\frac {b\,c\,\ln \left (e\,x+\sqrt {-d\,e}\right )\,\sqrt {-d\,e}}{4\,d\,e^2-4\,c^2\,d^2\,e}-\frac {2\,b\,c^2\,\mathrm {atan}\left (-\frac {\frac {c^2\,\left (c^8\,e\,x+\frac {c^2\,\left (2\,c^5\,e^3-4\,c^7\,d\,e^2+2\,c^9\,d^2\,e+\frac {c^2\,x\,\left (8\,c^{10}\,d^3\,e^2-8\,c^8\,d^2\,e^3-8\,c^6\,d\,e^4+8\,c^4\,e^5\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )}{4\,e^2-4\,c^2\,d\,e}-\frac {c^2\,\left (-c^8\,e\,x+\frac {c^2\,\left (2\,c^5\,e^3-4\,c^7\,d\,e^2+2\,c^9\,d^2\,e-\frac {c^2\,x\,\left (8\,c^{10}\,d^3\,e^2-8\,c^8\,d^2\,e^3-8\,c^6\,d\,e^4+8\,c^4\,e^5\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )}{4\,e^2-4\,c^2\,d\,e}}{\frac {c^2\,\left (c^8\,e\,x+\frac {c^2\,\left (2\,c^5\,e^3-4\,c^7\,d\,e^2+2\,c^9\,d^2\,e+\frac {c^2\,x\,\left (8\,c^{10}\,d^3\,e^2-8\,c^8\,d^2\,e^3-8\,c^6\,d\,e^4+8\,c^4\,e^5\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}+\frac {c^2\,\left (-c^8\,e\,x+\frac {c^2\,\left (2\,c^5\,e^3-4\,c^7\,d\,e^2+2\,c^9\,d^2\,e-\frac {c^2\,x\,\left (8\,c^{10}\,d^3\,e^2-8\,c^8\,d^2\,e^3-8\,c^6\,d\,e^4+8\,c^4\,e^5\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}\right )\,1{}\mathrm {i}}{4\,e^2-4\,c^2\,d\,e}}\right )}{4\,e^2-4\,c^2\,d\,e}-\frac {b\,\mathrm {atan}\left (c\,x\right )}{2\,e\,\left (e\,x^2+d\right )}-\frac {b\,c\,\ln \left (e\,x-\sqrt {-d\,e}\right )\,\sqrt {-d\,e}}{4\,\left (d\,e^2-c^2\,d^2\,e\right )}-\frac {a}{2\,e^2\,x^2+2\,d\,e} \]

[In]

int((x*(a + b*atan(c*x)))/(d + e*x^2)^2,x)

[Out]

(b*c*log(e*x + (-d*e)^(1/2))*(-d*e)^(1/2))/(4*d*e^2 - 4*c^2*d^2*e) - (2*b*c^2*atan(-((c^2*((c^2*(2*c^5*e^3 - 4
*c^7*d*e^2 + 2*c^9*d^2*e + (c^2*x*(8*c^4*e^5 - 8*c^6*d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